public class Test06 {
public static void main(String[] args) {
    int[] arr={-5,-15};
    int maxNumber=getMax(arr);
    System.out.println(maxNumber);
}  
public static int getMax(int[] arr){
    int max = arr[0];
    for (int i = 0; i < arr.length; i++) {
      
        if(arr[i]>max) {
            max=arr[i];  
        }
    }
    return max;
    }  
}
